package com.alan.netty.test;

import com.google.common.base.Splitter;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author weiBin
 * @date 2018/11/6
 */
@Data
public class Bean {
    private String followIds;
    private String id;
    private String name;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Bean bean = (Bean) o;
        return Objects.equals(id, bean.id);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id);
    }

    public Bean() {
    }

    public Bean(String followIds, String id, String name) {
        this.followIds = followIds;
        this.id = id;
        this.name = name;
    }

    public static void main(String[] args) {
        String str = "1111,2222";
        Iterable<String> strings = Splitter.on(",").split(str);
        System.out.println(strings);

        he:
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                for (int k = 0; k < 10; k++) {
                    System.out.println(String.format("%s %s %s", i, j,k));
                    if (j + i + k == 12) {
                        System.out.println("---------------");
                        continue he;
                    }
                }
            }
        }

    }
}
